#include <iostream>

/**
 * +    =>  p
 * *    =>  M
 * up   =>  U
 * (    =>  L
 * )    =>  R
 * #    =>  H
*/
enum SYMBOL{
    p,M,U,L,R,H,i,E,T,F,P
};

/**
 * >    =>  greater
 * <    =>  less
 * =    =>  equal
*/
enum Relation{
    mgreater,mless,mequal,merror
};

typedef struct node{
    SYMBOL x;
    SYMBOL y;
    Relation relation;
}TABLE;
// 定义全局变量

TABLE table[100];

int count = 0;

SYMBOL mStack[20];

int now = 0;
void printTABLE();
void initTABLE();
void insertTABLE(SYMBOL x, SYMBOL y, Relation relation);
void printHelp();
int getHead();
void push(SYMBOL x);
void printmStack(int start, int end);
SYMBOL pop();
SYMBOL getTop();
bool isLess(SYMBOL x, SYMBOL y);
bool isGreater(SYMBOL x, SYMBOL y);
Relation checkRelation(SYMBOL x, SYMBOL y);
char format(SYMBOL x);
SYMBOL convert(char c);
char fRelation(Relation r);
